package com.cade.agriculturemall.view.classify.goodsdetail.ServiceAssuranceDialog;

import android.content.Context;
import android.support.v7.app.AppCompatDialog;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;

import com.cade.agriculturemall.R;
import com.cade.agriculturemall.base.BaseAdapter;

/**
 * Created by Lobby on 2017/11/21.
 */

public class ServiceAssuranceDialog extends AppCompatDialog {
    ServiceAssuranceAdapter mAdapter = new ServiceAssuranceAdapter();

    public ServiceAssuranceDialog(Context context) {
        super(context);
        init();
    }

    private void init() {
        setContentView(R.layout.layout_service_assurance);
        Button bTn = (Button) findViewById(R.id.service_assurance_dialog_btn);
        bTn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.sa_recyclerview);
        LinearLayoutManager ll = new LinearLayoutManager(getContext());
        ll.setAutoMeasureEnabled(true);
        recyclerView.setLayoutManager(ll);
        mAdapter.notifyDataSetChanged();
        recyclerView.setAdapter(mAdapter);

    }

    public ServiceAssuranceAdapter getmAdapter() {
        return mAdapter;
    }

}
